package org.example.service;

import org.example.pojo.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//定义feign服务绑定接口,通过FeignClient注解绑定对外提供服务的服务名称
@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-USER")
public interface UserFeignService {

    @GetMapping("/user/get/{id}")
    SysUser getUser(@PathVariable("id") Integer id);

}
